package cn.b.sky.form.form.builder.impl;

import cn.b.sky.form.form.builder.BaseElementBuilder;
import cn.b.sky.form.model.BusinessField;
import cn.b.sky.form.model.ScreenField;

/**
 * 
 * <strong>Title : HiddenInputBuilder.java<br></strong>
 * <strong>Package : cn.b.sky.form.form.builder.impl<br></strong>
 * <strong>Description : </strong>隐藏元素的构建器<br> 
 * <strong>Create on : 2016-11-23 上午10:41:52<br></strong>
 * <p>
 * @author lidapeng<br>
 * @version <strong>v1.0.0</strong><br>
 * <br>
 * <strong>修改历史:</strong><br>
 * 修改人|修改日期|修改描述<br>
 * -------------------------------------------<br>
 * <br>
 * <br>
 */
public class HiddenInputBuilder extends BaseElementBuilder {

  @Override
  protected String buildHtmlElement(ScreenField sf) {
    BusinessField field = sf.getBf();
    StringBuilder sb = new StringBuilder();
    sb.append("<input type=\"text\" id=\"");
    sb.append(field.getFieldLabel()).append("\"");
    sb.append(" value=\"").append(field.getDefaultValue()).append("\"");
    sb.append(" />");
    return sb.toString();
  }

}
